<script setup>
import { ref } from 'vue'

const username=ref('');
const email=ref('');
const phone=ref('');

import {UserFilled,Calendar,Message} from '@element-plus/icons-vue';
import {useTokenStore} from "@/Stores/token.js";
const tokenStore = useTokenStore()
</script>
<template>
<!--  整体-->
  <div class="page-container">
<!--    左侧部分-->
    <el-card class="manger">
      <template #header>
        <span>个人信息</span>
      </template>
      <div class="img">
        <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" :size="100">
        </el-avatar>
      </div>
      <el-divider></el-divider>
      <div class="card">
        <div>
          <el-icon><UserFilled /></el-icon>昵称
        </div>
        <div>adimin</div>
      </div>
      <el-divider></el-divider>
      <div class="card">
        <div>
          <el-icon><Message /></el-icon>邮箱
        </div>
        <div>adimin</div>
      </div>
      <el-divider></el-divider>
      <div class="card">
        <div>
          <el-icon><Calendar /></el-icon>创建日期
        </div>
        <div>2024-09-09 14:13:28</div>
      </div>
      <el-divider></el-divider>
    </el-card>

<!--    右侧内容-->
    <el-card class="information">
      <template #header>
        <span>基本信息</span>
      </template>
      <div>
        <div class="from">
          <label for="">昵称</label>
          <el-input v-model="username" placeholder="请输入名称" maxlength="10" show-word-limit></el-input>
        </div>

        <div class="from">
          <label for="">邮箱</label>
          <el-input v-model="email" placeholder="请输入邮箱" maxlength="20" show-word-limit></el-input>
        </div>
      </div>

<!--      底部-->
      <el-form-item>
        <div class="flex">
          <el-button @click="updateForgetPassword" type="primary" auto-insert-space>
            保存
          </el-button>
          <el-button type="primary" :underline="false" @click="clearRegisterData()"
                     auto-insert-space>
            取消
          </el-button>
        </div>
      </el-form-item>
    </el-card>
  </div>
</template>

<style lang="scss" scoped>
.page-container {
  margin-left: 5px;
  display: flex;

  .manger{
    width: 50vh;
    margin-right: 20px;

    .img{
      display: flex;
      justify-content: center;
    }

    .card{
      display: flex;
      font-size: 15px;
      justify-content:space-between;

    }
  }
  .information {
    width: 90vh;
    height: 35vh;

    .from {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
      text-align: center;
      align-items: center;
    }

    label {
      width: 80px;
      height: 10px;
      margin-right: 20px;
      margin-bottom: 10px;
      text-align: right;
    }

    .flex {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-top: 15px;
      margin-bottom: 10px;
    }
  }
}

</style>
